package com.castle.fortress.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 课程学习状态枚举
 * @author castle
 */
@Getter
@AllArgsConstructor
public enum CourseStudyStatusEnum {
    NO_START(1,"未开始","未开始"),
    ONGOING(2,"进行中","进行中"),
    FINISHED(3,"已完成","已完成"),

    ;

    Integer code;
    String name;
    String desc;

    public static Integer getCodeByDesc(String desc){
        for(BankCardTypeEnum e:BankCardTypeEnum.values()){
            if(e.getDesc().equals(desc)){
                return e.getCode();
            }
        }
        return null;
    }
}
